function decodeUtf8(bytes) {
    var encoded = ""; for (var i = 0; i < bytes.length; i++) { encoded += '%' + bytes[i].toString(16); }
    return decodeURIComponent(encoded);
}
function dec(t) {
    if ("string" == typeof t)
        return t; for (var n = [], i = 0; i < t.length; i++) { n.push(t[i]); }
    return decodeUtf8(n);
}
function n(t) {
    var e = 0, n = t.length; if (n % 2 != 0) return null; n /= 2; for (var o = [], i = 0; i < n; i++) { var r = t.substr(e, 2), a = parseInt(r, 16); o.push(a), e += 2; }
    return o;
}
function m(t, e) {
    for (var n, o = e.length, i = (t ^ o) % 255, r = ((o & i) + (t ^ i)) % 255, a = [], s = 0; s < o; s++) { i -= (r * o ^ t) % 255, t -= r, n = 255 & ((n = e[s]) ^ (r = i % 255)), a.push(n); }
    return a;
}
function stringToByte(t) {
    var e, n, o = new Array(); e = t.length; for (var i = 0; i < e; i++) { 
        (n = t.charCodeAt(i)) >= 65536 && n <= 1114111 ? (o.push(n >> 18 & 7 | 240), o.push(n >> 12 & 63 | 128), o.push(n >> 6 & 63 | 128), o.push(63 & n | 128)) : n >= 2048 && n <= 65535 ? (o.push(n >> 12 & 15 | 224), o.push(n >> 6 & 63 | 128), o.push(63 & n | 128)) : n >= 128 && n <= 2047 ? (o.push(n >> 6 & 31 | 192), o.push(63 & n | 128)) : o.push(255 & n); }
    return o;
}
function parseByte2HexStr(t) {
    for (var e = "", n = 0; n < t.length; n++) { 
        var o = t[n].toString(16); 1 == o.length && (o = "0" + o), e += o; }
    return e;
}
function decode(a, b) { return dec(m(a, n(b))) }
function encode(e, n) { return parseByte2HexStr(m(e, stringToByte(n))) }